<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bootstrap提示框与模态框</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
</head>
<style>
    main {
        margin: 1%;
        padding: 10% 20%;
    }
</style>

<body>

    <main>
        <div class="toast show">
            <div class="toast-header">
                <strong>提示框</strong>
                <button type="button" class="ml-auto mb-1 close" data-dismiss="toast"><span>&times;</span></button>
            </div>
            <div class="toast-body">
                弹出提示框内容体
            </div>
        </div>

        <button class="btn btn-success" data-target="#modal1" data-toggle="modal">点击弹出模态框</button>
        <!-- 模态框 -->
        <div class="modal fade" id="modal1">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h3>这是标题</h3>
                        <button class="ml-auto close" data-dismiss="modal"><span>&times;</span></button>
                    </div>
                    <div class="modal-body">
                        表单, 图文列表, 数据表格
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-success">确认</button>
                        <button class="btn btn-danger" data-dismiss="modal">拒绝</button>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <script src="../js/jquery.min.js"></script>
    <script src="../js/bootstrap.bundle.min.js"></script>
    <script>
        $('.toast').toast();
    </script>
</body>

</html>